import { post,get,del,put } from '@/util/service'

export const addCartApi=data=>{ 
    return post({
        url:"/restaurant/shopping-cart/add",
        data
    })
}
export const addNumApi=data=>{ 
    return put({
        url:"/restaurant/shopping-cart/updateNum?id="+data.id+"&newQuantity="+data.newQuantity,
        data
    })
}
export const getCartApi=data=>{ 
    return get({
        url:"/restaurant/shopping-cart/findAll",
        data
    })
}
export const delCartApi=data=>{
    return del({
        url:"/restaurant/shopping-cart/del?id="+data.id
    })
}
export const clearCartApi=data=>{
    return del({
        url:"/restaurant/shopping-cart/clear?userId="+data.userId+"&shopId="+data.shopId
    })
}